/**
 * MineAdmin is committed to providing solutions for quickly building web applications
 * Please view the LICENSE file that was distributed with this source code,
 * For the full copyright and license information.
 * Thank you very much for using MineAdmin.
 *
 * @Author X.Mo<root@imoi.cn>
 * @Link   https://github.com/mineadmin
 */

import type { MaSearchItem } from '@mineadmin/search'
import MaDictSelect from '@/components/ma-dict-picker/ma-dict-select.vue'
import MaDictRadio from '@/components/ma-dict-picker/ma-dict-radio.vue'

export default function getSearchItems(t: any): MaSearchItem[] {
    return [
    { label: '设备名称', prop: 'name', render: 'input', renderProps: { placeholder: t('form.pleaseInput', { msg: '设备名称'}) } },
    { label: '设备型号', prop: 'model', render: () => MaDictSelect, renderProps: { placeholder: t('form.pleaseInput', { msg: '设备型号'}) } },
    { label: '经度', prop: 'longitude', render: 'input', renderProps: { placeholder: t('form.pleaseInput', { msg: '经度'}) } },
    { label: '纬度', prop: 'latitude', render: 'input', renderProps: { placeholder: t('form.pleaseInput', { msg: '纬度'}) } },
    { label: '海拔高度', prop: 'altitude', render: 'input', renderProps: { placeholder: t('form.pleaseInput', { msg: '海拔高度'}) } },
    { label: '设备类型ID', prop: 'type_id', render: () => MaDictSelect, renderProps: { multiple: false } },
    { label: '当前状态 1在线 2离线', prop: 'status', render: () => MaDictRadio, renderProps: { placeholder: t('form.pleaseInput', { msg: '当前状态 1在线 2离线'}) } },
    { label: '供应商ID', prop: 'vendor_id', render: () => MaDictSelect, renderProps: { multiple: false } },
    { label: '服务商ID', prop: 'service_id', render: () => MaDictSelect, renderProps: { multiple: false } },
    { label: '关联设备', prop: 'device', render: () => MaDictSelect, renderProps: { placeholder: t('form.pleaseInput', { msg: '关联设备'}) } },
  ]
}
